<template>
    <div style="width: 100%; height: 100%">
        <!-- 占整个子标签页的增删改查 -->
        <list
            ref="list"
            v-show="type === 'list'"
            @detail="detail(arguments)"
            @add="add(arguments)"
            @manage="manage(arguments)"
        ></list>
    </div>
</template>

<script type="text/ecmascript-6">
import list from './list'
export default {
    data: function () {
        return {
            detailType: 0, // 详情类型
            type: 'list', // type: list列表，add新增，edit编辑
            row: {}
        }
    },
    created () {
    },
    methods: {
        manage (arg) {
            this.row = arg[0]
            this.type = 'manage'
        },
        add (arg) {
            this.row = arg[0]
            this.type = 'add'
        },
        save () {
            this.type = 'list'
            this.$refs.list.getList()
        }
    },
    components: {
        list
    }
}
</script>

<style lang="stylus" rel="stylesheet/stylus" scoped></style>
